partnerCenterController = BaseController.extend({
	template:'partnerCenter',
	center:'合伙人中心',
	bottomShow:true,
	mainView: 'partnerCenter',
	waitOn:function(self){
		//let self = this;
		this.partnerInfo = this.currentUser();
		Meteor.subscribe('wallets',{partner_id:parseInt(this.partnerInfo.id)}, {});
		//Meteor.subscribe('partner',{id:parseInt(this.params.query.merchant_id)}, {});
	},
	onRendered:function(controller){
		var myApp = new Framework7({
			modalTitle: "提示",
			modalButtonOk: "确定",
          	modalButtonCancel: "取消",
		});
		var $$ = Dom7;
		$$('#trans_account').on('click', function () {
			myApp.confirm('确定切换账户？',function(){
				localStorage.clear(); 
				controller.router.go('app.login');
				//location.reload();
			});
		})
	},
	data:function(){
		let self = this;
		var level_name = this.partnerInfo.level_name;
		return{
			partnerCent : function(){
				return self.partnerInfo;
			},
			lastMoney : function(){
				return Wallets.findOne();
			},
//			partnerLevel: function(){
//				var level = {};
//				console.log(level_name)
//				switch (level_name){
//					case "company":
//						level.a_jump = "/myCompany";
//						level.level_title = "我的连";
//						level.img = "img/team.png";
//						break;
//					case "platoon":
//						level.a_jump = "/myPlatoon";
//						level.level_title = "我的排";
//						level.img = "img/team.png";
//						break;
//					case "monitor":
//						level.a_jump = "/myMonitor";
//						level.level_title = "我的班";
//						level.img = "img/team.png";
//						break;
//				}
//				return level;
//			},
		};
	},
})
